﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Web.Models
{
    
    
    public class UserRepresentation
    {

        private int id;
        private string name;
        private string email;
        private int numberOfLoginsInTheLast30Days;
        private DateTime latestLogin;

        public UserRepresentation(int id, string name, string email, int numberOfLoginsInTheLast30Days, DateTime latestLogin)
        {
            this.id = id;
            this.name = name;
            this.email = email;
            this.numberOfLoginsInTheLast30Days = numberOfLoginsInTheLast30Days;
            this.latestLogin = latestLogin;
        }

        public int GetId()
        {
            return id;
        }

        public string GetName() { return name; }

        public string GetEmail() { return email; }

        public int GetNumberOfLoginsInTheLast30Days() { return numberOfLoginsInTheLast30Days; }

        public DateTime GetLatestLogin() { return latestLogin; }
    }

    [Serializable]
    public class MessageRepresentation 
    {

        public int id { get; set; }
        public string title { get; set; }
        public string text { get; set; }
        public string sender { get; set; }
        public string receiver { get; set; }
        public DateTime timesent { get; set; }
        public bool archived { get; set; }
        public bool deleted { get; set; }
        public bool read { get; set; }

        public MessageRepresentation()
        {

        }

        public MessageRepresentation(string title, string text, int id, string sender, string receiver, DateTime timesent, bool archived, bool deleted, bool read)
        {
            this.timesent = timesent;
            this.title = title;
            this.text = text;
            this.archived = archived;
            this.deleted = deleted;
            this.read = read;
            this.sender = sender;
            this.receiver = receiver;
            this.id = id;
        }

        /*
        private string title;
        private int id;
        private string text;
        private string sender;
        private string reciever;
        private DateTime timesent;
        private bool archived;
        private bool deleted;
        private bool read;


        public string getTitle()
        {
            return title;
        }

        public DateTime getTimesent()
        {
            return timesent;
        }

        public bool GetRead()
        {
            return read;
        }

        public bool GetDeleted()
        {
            return deleted;
        }

        public bool GetArchived()
        {
            return archived;
        }

        public string GetReciever()
        {
            return reciever;
        }

        public string GetSender()
        {
            return sender;
        }

        public string GetText()
        {
            return text;
        }

        public int GetId()
        {
            return id;
        }
        */

    }


}
